//
//  UIColor+Hex.m
//  FZAH
//
//  Created by Yoga on 2017/3/21.
//  Copyright © 2017年 zdqk. All rights reserved.
//

#import "UIColor+Hex.h"

@implementation UIColor(hex)

/**
 *  @brief 16进制颜色转换 0xFFFFFF
 */
+ (UIColor *)colorWithHex:(long)hexColor alpha:(float)opacity {
    float red = ((float)((hexColor & 0xFF0000) >> 16))/255.0;
    float green = ((float)((hexColor & 0xFF00) >> 8))/255.0;
    float blue = ((float)(hexColor & 0xFF))/255.0;
    return [UIColor colorWithRed:red green:green blue:blue alpha:opacity];
}

/**
 *  @brief 主题色  0xF23030
 */
+ (UIColor *)ThemeColor {
    return [self colorWithHex:0xF23030 alpha:1.0];
}

/**
 *  @brief 标题栏颜色  0xefefef
 */
+ (UIColor *)NavBarColor {
    return [self colorWithHex:0xFFFFFF alpha:1.0];
}

/**
 *  @brief 分割线颜色    0xEEEEEE
 */
+ (UIColor *)disMistColor {
    return [self colorWithHex:0xEEEEEE alpha:1.0];
}

/**
 *  @brief 边框线颜色    0xCCCCCC
 */
+ (UIColor *)borderColor {
    return [self colorWithHex:0xCCCCCC alpha:1.0];
}

/**
 *  @brief 灰色字体     0x999999
 */
+ (UIColor *)grayTextColor {
    return [self colorWithHex:0x999999 alpha:1.0];
}

/**
 *  @brief 黑色字体     0x333333
 */
+ (UIColor *)blackTextColor {
    return [self colorWithHex:0x333333 alpha:1.0];
}

/**
 *  @brief 红色字体     0xf51a28
 */
+ (UIColor *)redTextColor {
    return [self colorWithHex:0xF51A28 alpha:1.0];
}

/**
 *  @brief 绿色字体     0x4ca92a
 */
+ (UIColor *)greenTextColor {
    return [self colorWithHex:0x4CA92A alpha:1.0];
}

/**
 *  @brief 蓝色字体     0x6FB4F9
 */
+ (UIColor *)blueTextColor {
    return [self colorWithHex:0x6FB4F9 alpha:1.0];
}

/**
 *  @brief 黄色字体     0xFCD32F
 */
+ (UIColor *)yellowTextColor {
    return [self colorWithHex:0xFCD32F alpha:1.0];
}


/**
 *  @brief 橘色字体     0xF47B02
 */
+ (UIColor *)orangeTextColor {
    return [self colorWithHex:0xF47B02 alpha:1.0];
}
/**
 *  @brief 个人灰色字体颜色  0x808080
 */
+ (UIColor *)personalGrayTextColor {
    return [self colorWithHex:0x808080 alpha:1.0];
}

/**
 *  @brief placeHolder 颜色  0xa6a6a6
 */
+ (UIColor *)placeHolderColor {
    return [self colorWithHex:0xA6A6A6 alpha:1.0];
}

/**
 *  @brief 背景色  0xF2F2F2
 */
+ (UIColor *)backgroundColor {
    return [self colorWithHex:0xF2F2F2 alpha:1.0];
}

/**
 *  @brief 黑背景色  0x202022
 */
+ (UIColor *)blackBackgroundColor{
    return [self colorWithHex:0x202022 alpha:1.0];
}

/**
 *  @brief 灰背景色  0xDDDDDD
 */
+ (UIColor *)grayBackgroundColor{
    return [self colorWithHex:0xDDDDDD alpha:1.0];
}

/**
 *  @brief cell黑背景色  0x14171D
 */
+ (UIColor *)cellBlackBackgroundColor {
    return [self colorWithHex:0x14171D alpha:1.0];
}

/**
 *  @brief searchBar灰背景色  0xEAEBED
 */
+ (UIColor *)searchBackgroundColor {
    return [self colorWithHex:0xEAEBED alpha:1.0];
}

/**
 *  @brief 图片灰背景色  0xEDEDED
 */
+ (UIColor *)imageEDBackgroundColor {
    return [self colorWithHex:0xEDEDED alpha:1.0];
}

+ (UIColor *)grayF9Color {
    return [self colorWithHex:0xF9F9F9 alpha:1.0];
}

+ (UIColor *)grayF5Color {
    return [self colorWithHex:0xF5F5F5 alpha:1.0];
}

+ (UIColor *)grayE5Color {
    return [self colorWithHex:0xE5E5E5 alpha:1.0];
}

/**
 *  @brief 橙色价格 0xFF6B00
 */
+ (UIColor *)orangePriceColor {
    return [self colorWithHex:0xFF6B00 alpha:1.0];
}

/**
 *  @brief 灰色 0x969696
 */
+ (UIColor *)gray96Color {
    return [self colorWithHex:0x969696 alpha:1.0];
}

/**
 *  @brief 灰色 0xDDDDDD
 */
+ (UIColor *)grayDDColor {
    return [self colorWithHex:0xDDDDDD alpha:1.0];
}

/**
 *  @brief 灰色 0x666666
 */
+ (UIColor *)gray66Color {
    return [self colorWithHex:0x666666 alpha:1.0];
}

/**
 *  @brief 灰色 0xfafafa
 */
+ (UIColor *)grayfaColor {
    return [self colorWithHex:0xFAFAFA alpha:1.0];
}

/**
 *  @brief 黄色 0xfcc22f
 */
+ (UIColor *)yellowButtonColor {
    return [self colorWithHex:0xFCC22F alpha:1.0];
}

/**
 *  @brief 黄色 0xfff200
 */
+ (UIColor *)yellowLineColor {
    return [self colorWithHex:0xFFF200 alpha:1.0];
}

/**
 *  @brief 黄色 0xFF9805
 */
+ (UIColor *)yellowAddCartColor {
    return [self colorWithHex:0xFF9805 alpha:1.0];
}

/**
 *  @brief 灰色 0xF0F2F5
 */
+ (UIColor *)grayF0Color {
    return [self colorWithHex:0xF0F2F5 alpha:1.0];
}

/**
 *  @brief 红色 0xF23030
 */
+ (UIColor *)redF2color {
    return [self colorWithHex:0xF23030 alpha:1.0];
}

/**
 *  @brief 绿色 0x37C6A4
 */
+ (UIColor *)green37Color {
    return [self colorWithHex:0x37C6A4 alpha:1.0];
}
@end
